<?php
/**
 * Created by IntelliJ IDEA.
 * User: Administrator
 * Date: 2019/9/19
 * Time: 10:08
 */
namespace app\api\validate;
use think\Validate;

class Area extends Validate
{
    /**
     * 定义验证规则
     * 格式：'字段名'	=>	['规则1','规则2'...]
     * typeof => integer,float,bool,string,array,object,null,resouce
     * @var array
     */
    protected $rule = [
        'id'=>['regex'=>'/^[0-9]*$/','typeof'=>'integer'],
        'areaName'=>['typeof'=>'string'],
        'level'=>['typeof'=>'integer'],
        'parentId'=>['typeof'=>'integer'],
    ];

    /**
     * 定义错误信息
     * 格式：'字段名.规则名'	=>	'错误信息'
     *
     * @var array
     */
    protected $message = [

    ];

    protected $scene = [

    ];
}